﻿@using Microsoft.AspNetCore.Mvc.Localization
@inject IViewLocalizer Localizer

<li class="nav-item dropdown">
    <a class="nav-link" data-toggle="dropdown" href="#" role="button" aria-haspopup="true" aria-expanded="false">
        <i class="fa fa-2x fa-globe"></i>
    </a>
    <div class="dropdown-menu dropdown-menu-right dropdown-menu-lg">
        <div class="dropdown-header text-center">
            <strong>@Localizer["Title-Available-Languages"]</strong>
        </div>
        <a asp-controller="Home" asp-action="SetLanguage" asp-route-culture="pt-BR" asp-route-returnUrl="@Context.Request.Path.ToString().Replace("/", "")" class="dropdown-item">
            <i class="flag-icon flag-icon-br"></i> @Localizer["Title-Português"]
        </a>
        <a asp-controller="Home" asp-action="SetLanguage" asp-route-culture="en" asp-route-returnUrl="@Context.Request.Path.ToString().Replace("/", "")" class="dropdown-item">
            <i class="flag-icon flag-icon-us"></i> @Localizer["Title-English"]
        </a>
    </div>
</li>